package es.onlysolutions.gs.comm.entity;

import es.onlysolutions.arq.core.accesobd.IEntityId;

/**
 * Entity for the table t_video_process. Is a video that is still being processed by You Tube.
 * Due to the special treatment this entity will be handled by the VideoHbDao class too.
 */
public class VideoProcess implements IEntityId
{

    /**
     * Devuelve el nombre del atributo que es ID en esta entidad.<br>
     * Esto es necesario para el filtrado automatico de las subentidades de cada entidad padre.
     *
     * @return Un String representando el nombre del atributo que es el ID de esta entidad.
     */
    public String getIdName()
    {
        return "id";
    }

    private Long id;
    private String title;
    private String content;
    private String keyWords;
    private String youTubeId;
    private String categoryContent;
    private String categoryLabel;
    private String fileName;
    private User user = new User();

    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public String getTitle()
    {
        return title;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getContent()
    {
        return content;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public String getKeyWords()
    {
        return keyWords;
    }

    public void setKeyWords(String keyWords)
    {
        this.keyWords = keyWords;
    }

    public String getYouTubeId()
    {
        return youTubeId;
    }

    public void setYouTubeId(String youTubeId)
    {
        this.youTubeId = youTubeId;
    }

    public String getCategoryContent()
    {
        return categoryContent;
    }

    public void setCategoryContent(String categoryContent)
    {
        this.categoryContent = categoryContent;
    }

    public String getCategoryLabel()
    {
        return categoryLabel;
    }

    public void setCategoryLabel(String categoryLabel)
    {
        this.categoryLabel = categoryLabel;
    }

    public User getUser()
    {
        return user;
    }

    public void setUser(User user)
    {
        this.user = user;
    }

    public String getFileName()
    {
        return fileName;
    }

    public void setFileName(String fileName)
    {
        this.fileName = fileName;
    }

    public boolean equals(Object o)
    {
        if (this == o)
        {
            return true;
        }
        if (o == null || getClass() != o.getClass())
        {
            return false;
        }

        VideoProcess that = (VideoProcess) o;

        if (id != null ? !id.equals(that.id) : that.id != null)
        {
            return false;
        }

        return true;
    }

    public int hashCode()
    {
        return (id != null ? id.hashCode() : 0);
    }


    public String toString()
    {
        return "VideoProcess{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", keyWords='" + keyWords + '\'' +
                ", youTubeId='" + youTubeId + '\'' +
                ", categoryContent='" + categoryContent + '\'' +
                ", categoryLabel='" + categoryLabel + '\'' +
                ", user=" + user +
                '}';
    }
}
